<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>查看订单详情</title>
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul"><li><a href="/index.html">首页</a></li><li>查看订单详情</li></ul>
    </div>
    <div class="formbody">
    	<input id="id" type="hidden" value="${(info.id)!0}"></input>
    	<#if info.amountPay??>
	    <div style="clear: both">
			<div class="formtitle"><span>支付信息</span></div>
		    <ul class="forminfo forminfo-2col">
		    	<li>支付金额：&yen;${((info.amountPay)!0)?string('0.00')}</li>
			    <li>支付时间：${(info.payTime)?string("yyyy-MM-dd HH:mm:ss")}</li>
			    <li>支付方式：${(info.payMethodName)!"--"}</li>
			    <li>交易流水：${(info.batch)!"--"}</li>
		    </ul>
	    </div>
	    </#if>
    	<div style="clear: both">
			<div class="formtitle"><span>基础信息</span></div>
		    <ul class="forminfo forminfo-2col">
		    	<li>订单编号：${(info.code)!"--"}</li>
			    <li>订单状态：${(info.statusName)!"--"}</li>
			    <li>订单金额：&yen;${((info.amountTotal)!0)?string('0.00')}</li>
			    <li>下单时间：${(info.orderTime)?string("yyyy-MM-dd HH:mm:ss")}</li>
			    <li>下单用户：${(info.userName)!"--"}</li>
			    <li>订单来源：
			        <#if sources??><#list sources as item>
			        <#if item.val == info.orderSource>${(item.text)!"--"}</#if>
			        </#list></#if>
				</li>
		    </ul>
	    </div>
    	<div style="clear: both">
			<div class="formtitle"><span>配送信息</span></div>
		    <ul class="forminfo forminfo-2col">
		    	<li>联系人：${(info.contacts)!"--"}</li>
		    	<li>联系电话：${(info.phone)!"--"}</li>
			    <li class="width-100">送货地址：${(info.shippingAddress)!"--"}</li>
			    <li class="width-100">订单备注：${(info.remark)!"--"}</li>
		    </ul>
	    </div>
	    
	    <div style="clear: both">
		    <div id="itabs" class="usual"> 
			    <div class="itab">
				  	<ul>
					    <li><a href="#orderWares" class="selected">订单商品</a></li>
					    <li><a href="#orderLogs">订单日志</a></li>
					    <li><a href="#faxInfo">发票信息</a></li>
				  	</ul>
			    </div> 
			  	<div id="orderWares" class="tabson">
			  		<table class="tablelist">
				    	<thead>
					    	<tr>
						        <th width="5%">ID</th>
						        <th width="10%">商品图</th>
						        <th width="15%">商品名称</th>
						        <th width="14%">单价</th>
						        <th width="8%">单件积分</th>
						        <th width="5%">数量</th>
						        <th width="10%">金额合计</th>
						        <th width="10%">积分合计</th>
						        <th width="15%">备注</th>
						        <th width="8%">操作</th>
					        </tr>
				        </thead>
				        <tbody>
				        <#if wares??>
						  		<#list wares as item>
									<tr>
								        <td>${(item.id)!0}</td>
								        <td><a href="/ware/info/view/${(item.id)!0}.html"><img src="${(item.imageMain)!"--"}" width="70px" /></a></td>
								        <td><a href="/ware/info/view/${(item.id)!0}.html">${(item.wareName)!"--"}</a></td>
								        <td>
								        	<p>购买价：&yen;${((item.pricePromotional)!0)?string('0.00')}</p>
								        	<p style="text-decoration:line-through;">原&emsp;价：&yen;${((item.priceOriginal)!0)?string('0.00')}</p>
								        </td>
								        <td>${(item.score)!"--"}&ensp;分</td>
								        <td>${(item.number)!"--"}</td>
								        <td>&yen;${((item.amountTotal)!0)?string('0.00')}</td>
								        <td>${(item.scoreTotal)!"--"}&ensp;分</td>
								        <td>${(item.remark)!"--"}</td>
								        <td>
								        	<p>
									        	<a href="/ware/info/view/${item.id}.html">查看详情</a>
								        	</p>
								        </td>
							        </tr> 
						  		</#list>
						  	</#if>
				        </tbody>
				    </table>
			  	</div>
			  	<div id="orderLogs" class="tabson">
			  		<div class="loading-img-wapper">
			  			<img src="/images/loading_3.gif"/>
			  			<p>&nbsp;</p>
			  			<p>数据加载中…</p>
			  		</div>
			  	</div>
			  	<div id="faxInfo" style="padding:20px 0;">
			  		<ul class="forminfo forminfo-2col">
			  		<!-- 1、增值税发票；2、个人；3、普票；4、电子发票  -->
				    	<li>发票类型：
				        <#if invoiceTypes??><#list invoiceTypes as item>
				        <#if item.val == info.invoiceType>${(item.text)!"--"}</#if>
				        </#list></#if>
				    	</li>
				    	<li>发票内容：${(info.invoiceContent)!"--"}</li>
					    <li>发票抬头：${(info.invoiceTitle)!"--"}</li>
					    <li>纳税人识别码：${(info.taxpayerCode)!"--"}</li>
					    <li>开户银行：${(info.bank)!"--"}</li>
					    <li>银行账号：${(info.bankAccount)!"--"}</li>
				    </ul>
			  	</div>
			</div>
	    </div>
    </div>
    
	<div class="fix-bottom-float">&nbsp;</div>
	<div class="fix_bottom">
		<!-- 根据不同状态显示不同按钮，此处js和列表页面共用 -->
	 	<#if info.status == 2>
	 	<input name="modifyStatusBtn" type="button" class="btn" value="发货" orderId=${(info.id)!0} nextStatus="SENT" op="SEND" />
	 	<input name="modifyStatusBtn" type="button" class="btn" value="申请退款" orderId=${(info.id)!0} nextStatus="REFUND_APPLY" op="REFUND"  />
	 	<#elseif info.status==3>
	 	<input name="modifyStatusBtn" type="button" class="btn" value="完成订单" orderId=${(info.id)!0} nextStatus="COMPLETED" op="COMPLETE"  />
	 	<input name="modifyStatusBtn" type="button" class="btn" value="申请退货" orderId=${(info.id)!0} nextStatus="REFUND_GOODS" op="REFUND_GOODS"  />
	 	<#elseif info.status==7>
	 	<input name="modifyStatusBtn" type="button" class="btn" value="同意退款" orderId=${(info.id)!0} nextStatus="REFUNDING" op="AUDIT_REFUND"  />
	 	<input name="modifyStatusBtn" type="button" class="btn" value="拒绝退款" orderId=${(info.id)!0} nextStatus="REFUND_FAIL" op="AUDIT_REFUND"  />
	 	<#elseif info.status==8>
	 	<input name="modifyStatusBtn" type="button" class="btn" value="打款" orderId=${(info.id)!0} nextStatus="REFUNDED" op="RIMIT"  />&emsp;
	 	<input name="modifyStatusBtn" type="button" class="btn" value="拒绝" orderId=${(info.id)!0} nextStatus="REFUND_FAIL" op="COMPLETE"  />
	 	<#elseif info.status==11>
	 	<input name="modifyStatusBtn" type="button" class="btn" value="同意退货" orderId=${(info.id)!0} nextStatus="REFUNDING_GOODS" op="AUDIT_REFUND_GOODS"  />
	 	<input name="modifyStatusBtn" type="button" class="btn" value="拒绝退货" orderId=${(info.id)!0} nextStatus="REFUND_GOODS_FAIL" op="AUDIT_REFUND_GOODS"  />
	 	<#elseif info.status==12>
	 	<input name="modifyStatusBtn" type="button" class="btn" value="同意退款" orderId=${(info.id)!0} nextStatus="REFUND_APPLY" op="REFUND"  />
	 	<input name="modifyStatusBtn" type="button" class="btn" value="拒绝退款" orderId=${(info.id)!0} nextStatus="REFUND_GOODS_FAIL" op="COMPLETE"  />
	 	</#if>
    	<input id="cancelBtn" type="button" class="btn" value="返回"/>
    </div>
    
    <#include "/common/orderStatusTipLayer.html">
</body>

<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="/js/ext/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="/js/commonAdd.js"></script>
<script type="text/javascript" src="/js/biz/orderInfoView.js"></script>
<script type="text/javascript" src="/js/biz/orderStatusTipLayer.js"></script>
</html>